home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
dflat_r_.arc
/
HTREE.H
< prev
next >
Wrap
Text File
|
1991-10-02
|
1KB
|
39 lines
/* ------------------- htree.h -------------------- */
typedef unsigned int BYTECOUNTER;
/* ---- Huffman tree structure ---- */
struct htree {
unsigned char ch; /* character value */
BYTECOUNTER cnt; /* character frequency */
int parent; /* offset to parent node */
int right; /* offset to right child node */
int left; /* offset to left child node */
};
extern struct htree *ht;
extern int root;
#ifdef INCLUDE_COMPRESS_HELPFILE
void buildtree(void);
FILE *OpenHelpFile(void);
void HelpFilePosition(long *, int *);
void *GetHelpLine(char *);
void SeekHelpLine(long, int);
#else
#define OpenHelpFile() \
{ \
char hf[64]; \
strcpy(hf, DFlatApplication); \
strcat(hf, ".TXT"); \
helpfp=fopen(hf, "rt"); \
}
#define HelpFilePosition(o,b) *o=ftell(helpfp)
#define GetHelpLine(s) fgets(s,160,helpfp)
#define SeekHelpLine(o,b) fseek(helpfp,o,0)
#endif